<?php
  $yhendus=new mysqli("localhost", "root", "", "test1");
  $kask=$yhendus->prepare("SELECT id, kassnimi, toon FROM kassid");
  $kask->bind_result($id, $kassnimi, $toon);
  $kask->execute();
?>

<!doctype html>
<html>
  <head>
     <title>Kassileht!</title>
  </head>
  <body>

     <?php
       while($kask->fetch()){
         echo "<h2 style='color: $toon'</h2>";
      
       }
     $yhendus->close();
	 ?>
  </body>
</html>

